package com.wen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wen.pojo.Gather;
import com.wen.pojo.Pay;
import com.wen.pojo.dto.GatherDto;
import com.wen.pojo.dto.PayDto;
import com.wen.pojo.vo.GatherVo;
import com.wen.pojo.vo.PayVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface PayMapper extends BaseMapper<Pay> {

    Page<Pay> pageListPay(Page page, @Param("payVo") PayVo payVo);

    @Select("SELECT p.*,s.stock_name FROM pay p,stock s WHERE p.stock_id=s.stock_id AND p.pay_order_number=#{id}")
    PayDto payById(String id);

    /**
     * 出库拒绝通过
     */
    @Update("UPDATE pay SET check_tag='s001-2' WHERE pay_order_number=#{id}")
    boolean UpPay(String id);
}
